#pragma once

namespace MiniHttpServer
{
	public ref class IHttpResponse abstract
	{
	public:
		// getters of this interface are usually for debugging purposes

		virtual ~IHttpResponse() {};

		virtual property System::String^ ContentType
		{ 
			System::String^ get() = 0;
			void set(System::String^) = 0;
		};
		virtual property __int64 ContentLength 
		{ 
			__int64 get() = 0; 
			void set(__int64) = 0;
		};

		virtual property bool KeepAlive
		{ 
			bool get() = 0; 
			void set(bool) = 0;
		};

		virtual property System::Net::HttpStatusCode Status
		{ 
			System::Net::HttpStatusCode get() = 0;
			void set(System::Net::HttpStatusCode) = 0;
		};

		virtual property bool Chunked
		{ 
			bool get() = 0; 
			void set(bool) = 0;
		};

		// When the body is requested, the response header is sent, writing to the stream
		// usually writes directly to the network. This is also the reason why it is NOT a property.
		virtual System::IO::Stream^ GetBody() = 0;

		virtual void AddHeaderValue(System::String^ strKey, System::String^ strValue) = 0;
		virtual property System::Collections::Specialized::NameValueCollection^ Headers { System::Collections::Specialized::NameValueCollection^ get() = 0;	};
		virtual property System::String^ StatusDescription { System::String^ get() = 0; };
	};
};